home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume6 / misc.patches1 < prev    next >
Encoding:
Internet Message Format  |  1986-11-30  |  7.8 KB

  1. Subject: v06i059:  Changes to calls, compress, ditrev, getpaths, nbatcher (Misc.Patches1)
  2. Newsgroups: mod.sources
  3. Approved: rs@mirror.UUCP
  4.  
  5. Mod.sources: Volume 6, Issue 59
  6. Submitted by: rs@mirror.UUCP (Rich $alz)
  7. Archive-name: Misc.Patches1
  8.  
  9. This article contains suggestions for enhancements, bugfixes, and revised
  10. documentation for calls and getpaths, compress, and nbatcher, respectively.
  11. I am packaging them up together and sound them out as one piece because
  12. the changes are small and straightforward.  Any comments for or against
  13. this process?  I will not do it often -- generally, I redirect questions
  14. and comments to the original authors (some people apparently have trouble
  15. understanding what the Submitted_by line means).
  16.         --r$
  17.  
  18. #!/bin/sh
  19. # This is a shell archive.  Remove anything before this line,
  20. # then unpack it by saving it in a file and typing "sh file".
  21. # Wrapped by rs@mirror.UUCP on Wed Jul 16 11:40:31 EDT 1986
  22. #
  23. # Contents:  calls.mods compress.mods ditrev.mods getpaths.mods
  24. #    nbatcher.page
  25.  
  26. echo x - calls.mods
  27. sed 's/^XX//' > "calls.mods" <<'@//E*O*F calls.mods//'
  28. XXFrom: wjh12!pixel!pixutl!chris
  29. XXSubject: Re: v06i003:  new calls; shows function call flow (calls.new)
  30. XXI would like to suggest a minor change to your 'calls' program. It does
  31. XXnot accept stdin unless you specify '-' as an argument. This can easily
  32. XXbe fixed by adding an extern variable:
  33. XX    int anyproc;
  34.  
  35. XXthen, inside of process(), do:
  36. XX    anyproc++;
  37.  
  38. XXand in main(), after the  'while (EOF != getarg (argc, argv)) {'  loop, add:
  39. XX    if (anyproc == 0)
  40. XX        dostdin();
  41.  
  42. XXChris
  43. @//E*O*F calls.mods//
  44. chmod u=rw,g=rw,o=rw calls.mods
  45.  
  46. echo x - compress.mods
  47. sed 's/^XX//' > "compress.mods" <<'@//E*O*F compress.mods//'
  48.  
  49. XXFrom: seismo!elsie!ado
  50. XXSubject: Re: v06i023:  Xenix patches to compress4.0 (compress.xenix)
  51.  
  52. XX(Forgiveness, gentle moderator:  my mail to the original poster was bounced.)
  53.  
  54. XX+ The XENIX_16 code for compress did not work.  The problem was:
  55. XX+    a) a problem with the large model code optimizer.
  56. XX+    b) the constant (1<<16) as assigned to maxcode evaluates
  57. XX+       to zero on a 16 bit machine!
  58. XX+ After fixing problem b, I removed the XENIX_16 code and instead declared
  59. XX+ the large arrays as 'huge'.
  60. XX+ . . .
  61. XX+ XX< #ifndef M_XENIX
  62. XX+ XX< #  define huge        /* needed only for 16-bit machines */
  63. XX+ XX< #endif
  64.  
  65. XXThe Xenix 3.0 C compiler *does* predefine M_XENIX; it *does not* allow arrays
  66. XXto be declared "huge."  If sixteen-bit compress is to be run on Xenix 3.0
  67. XXsystems, the existing "XENIX_16" code should be (fixed and) kept; if not,
  68. XX"M_XENIX" above should be changed to some symbol that's predefined only by
  69. XXcompilers that support "huge" arrays.
  70. XX--
  71. XXXenix is a Microsoft trademark, right?
  72. XX--
  73. XX    UUCP: ..decvax!seismo!elsie!ado        ARPA: elsie!ado@seismo.ARPA
  74. XX    DEC, VAX, Elsie & Ado are Digital, Borden & Shakespeare trademarks.
  75. @//E*O*F compress.mods//
  76. chmod u=rw,g=rw,o=rw compress.mods
  77.  
  78. echo x - ditrev.mods
  79. sed 's/^XX//' > "ditrev.mods" <<'@//E*O*F ditrev.mods//'
  80. XXFrom: cca!caip!uw-beaver!uw-wally!schwartz (Michael F. Schwartz)
  81. XXSubject: Re: v06i042:  Page reverser for ditroff (ditrev)
  82.  
  83. XXI noticed the following bug in the comments for my ditrev program:
  84.  
  85. XX36c36
  86. XX<                 postscript page.  I empirically determined that
  87. XX---
  88. XX>                 ditroff page.  I empirically determined that
  89.  
  90. XXThis is pretty minor, but might as well be fixed for the archives.
  91. XX - Mike Schwartz
  92. XX   University of Washington Computer Science Department
  93. XX   ihnp4!uw-beaver!schwartz  (USENET)
  94. XX   schwartz@wally.arpa  (ARPANET)
  95. XX   schwartz%wally.arpa@csnet-relay.arpa  (CSNET)
  96. @//E*O*F ditrev.mods//
  97. chmod u=rw,g=rw,o=rw ditrev.mods
  98.  
  99. echo x - getpaths.mods
  100. sed 's/^XX//' > "getpaths.mods" <<'@//E*O*F getpaths.mods//'
  101. XXFrom: ihnp4!icom!andy (Andrew H. Marrinson at Icom Systems, Inc.)
  102. XXSubject: Re: getpaths -- oscantree.c NG on sysV
  103. XXCc: jbuck@epimass
  104.  
  105. XXThe scan_tree function supplied for system V and V7 doesn't work on my
  106. XXSV.2 Vax.  Fortunately, there is an easy solution; I just added the line:
  107. XX    #define scan_tree(XP,XF) ftw(XP,XF,10)
  108. XXto the front of my getpath.c, changed the makefile accordingly, and voila.
  109. XXNow on version 7 you've got a bug to fix.
  110.  
  111. XX---
  112. XXAndrew H. Marrinson
  113. XXICOM Systems, Inc.
  114. XXArlington Heights, IL 60005
  115. XXandy@icom.UUCP {ihnp4!icom!andy}
  116. @//E*O*F getpaths.mods//
  117. chmod u=rw,g=rw,o=rw getpaths.mods
  118.  
  119. echo x - nbatcher.page
  120. sed 's/^XX//' > "nbatcher.page" <<'@//E*O*F nbatcher.page//'
  121. XXFrom: cca!caip!cbmvax!bpa!espo (Bob Esposito)
  122. XXSubject: Revised manual page for Nbatcher
  123.  
  124. XXI found 3 small errors in nbatcher.1  I sending you the corrected manual page.
  125.  
  126. XX=============================================
  127. XX.TH NBATCHER 1 LOCAL
  128. XX.SH NAME
  129. XXnbatcher  \- new batching system for news
  130. XX.SH SYNOPSIS
  131. XX.B nbatcher
  132. XX.IR "(run out of " cron ".)"
  133. XX.SH DESCRIPTION
  134. XX.PP
  135. XX.I Nbatcher
  136. XXis a program designed to send batched USENET data out
  137. XXin an orderly and controlled fashion, while providing alternative
  138. XXtransmission methods.  As such, it is a replacement for
  139. XX.I csendbatch
  140. XXand the like, which typically require many entries in
  141. XX.IR crontab .
  142. XX.I Nbatcher
  143. XXis intended to be run hourly out of
  144. XX.I cron
  145. XXas the USENET administrator (NEWSID).
  146. XX.PP
  147. XX.I Nbatcher
  148. XXscans the file
  149. XX.I nbatcher.ctl
  150. XXin the NEWSLIB directory to determine if work should be spooled
  151. XXfor a system.  In the control file, lines starting with asterisks
  152. XXare ignored; data lines are comprised of five colon\-separated
  153. XXfields:
  154. XX.RS
  155. XXsite:hour:bits:queue_size:command
  156. XX.RE
  157. XX.TP
  158. XXThe ``site'' field is the USENET neighbor; it is the same as the site in the
  159. XXnews
  160. XX.I sys
  161. XXfile.
  162. XX.TP
  163. XXThe ``hours'' field is patterned after
  164. XX.IR cron's.
  165. XXIf the hour is ``off,'' no work is spooled for the site.  An hour of
  166. XX``*'' matches every hour.  It is also possible to specify specific
  167. XXhours, (e.g., 8, 09, or 22), a comma-separated list (e.g., 8,09,22),
  168. XXor a twenty\-four range, like 10-\15 for 10am through 3pm and 22\-4,
  169. XXfor 10pm through 4am.
  170. XX.TP
  171. XXThe ``bits'' field specifies the number of bits to use in compression;
  172. XXit should be a number between nine and 16, inclusive, or null.  If
  173. XXa number is specified, it is passed on to the
  174. XX.I compress
  175. XXprogram via the ``\-b'' flag.
  176. XX.TP
  177. XXThe ``queue_size'' field specifies the maximum number of bytes allowed
  178. XXin the UUCP queue for this site.  The default is 100K.
  179. XXThe UUCP queue size is determined by lookin in the
  180. XX.IR /usr/spool/uucp/ site
  181. XXdirectory; if it doesn't exist, the check is bypassed.  If there is
  182. XXdata in the UUCP queue,
  183. XX.I nbatcher
  184. XXwill only queue up as many USENET transfers as will fit within the limit
  185. XXspecified by the ``queue_size'' field.
  186. XX.TP
  187. XXThe ``command'' field is used to specific the UUCP command that should
  188. XXbe used to queue the job; the default is ``uux \- \-r site!rnews'';
  189. XXnote the absence of the ``\-z'' flag.
  190. XX.PP
  191. XXTo set up a USENET neighbor to be controlled by nbatcher, the news
  192. XX.I sys
  193. XXentry for the neighbor must be modified to specify the ``F'' flag,
  194. XXand the file used to contain the article names must be
  195. XX.RI BATCHDIR/sysname ,
  196. XXwhere BATCHDIR is set in the Makefile as distributed.
  197. XX.SH "FILES"
  198. XXNEWSLIB/nbatcher.log
  199. XX.br
  200. XX.in +1i
  201. XXa logfile of failures, postponements, etc.
  202. XX.in -1i
  203. XX.SH BUGS
  204. XXParsing of the control file is fairly robust, but not perfect.
  205.  
  206.  
  207. @//E*O*F nbatcher.page//
  208. chmod u=rw,g=rw,o=rw nbatcher.page
  209.  
  210. echo Inspecting for damage in transit...
  211. temp=/tmp/sharin$$; dtemp=/tmp/sharout$$
  212. trap "rm -f $temp $dtemp; exit" 0 1 2 3 15
  213. cat > $temp <<\!!!
  214.       15      74     460 calls.mods
  215.       27     182    1107 compress.mods
  216.       16      69     569 ditrev.mods
  217.       15      83     540 getpaths.mods
  218.       86     466    2746 nbatcher.page
  219.      159     874    5422 total
  220. !!!
  221. wc  calls.mods compress.mods ditrev.mods getpaths.mods nbatcher.page | sed 's=[^ ]*/==' | diff -b $temp - >$dtemp
  222. if test -s $dtemp
  223. then echo "Ouch [diff of wc output]:" ; cat $dtemp
  224. else echo "No problems found."
  225. fi
  226. exit 0
  227.